home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Celestin Apprentice 7
/
Apprentice-Release7.iso
/
Environments
/
Open Prolog 1.0.3d33
/
External Predicates…
/
Sources
/
prlxDefinitions.p
< prev
next >
Wrap
Text File
|
1995-06-08
|
9KB
|
317 lines
UNIT prlxDefinitions;
INTERFACE
CONST
{outcome codes, based on ISO error conditions and a few more…}
noErrorSucceed = 0;
noErrorFail = 1;
systemError = 2;
calculationError = 3;
databaseError = 4;
evaluationError = 5;
implementationError = 6;
instantiationError = 7;
ioControlError = 8;
ioEndOfFileError = 9;
ioFormattingError = 10;
operatorError = 11;
overflowError = 12;
unclassifiedError = 13; {this is not part of the ISO definition}
syntaxError = 14;
typeError = 15;
undefinedPredicateError = 16;
undefinedValueError = 17;
underflowError = 18;
zeroDivideError = 19;
domainError = 20;
userInterrupt = 21; {this is not part of the ISO definition}
notAnErrorCode = - 1;
{tags}
variableTag = 0;
atomTag = 24;
integerTag = 32;
structureTag = 40;
realTag = 52;
{commands}
getPRLXInfo = 1;
initialisePredicate = 2;
callPredicate = 3;
closePredicate = 4;
getEventsVersion = 5;
{callback commands}
getTermInfo = 1;
getSubTerm = 2;
newTerm = 3;
unifyTerms = 4;
unifyToFunctor = 5;
unifyToInteger = 6;
identicalTerms = 7;
listArgumentToString = 8;
stringToListArgument = 9;
writeError = 10;
writeString = 11;
writelnString = 12;
drawALRT = 13;
pushDisplayString = 14;
popDisplayString = 15;
getEventRecord = 16;
doMyModalDialog = 17;
sendEvents = 18; {ask Open Prolog to send raw events}
inForeground = 19; {put 1 in callbackdata[1] if in foreground mode?}
startNotification = 20; {put up a notification}
stopNotification = 21;
getFreeTerm = 22; {get the index number of a new unbound local variable in
callbackdata[1]}
getPredicateNameAndArity = 23;
getHomeResFileID = 24;
registerAnIOHandler = 25;
registerAnIOObject = 26;
deRegisterAnIOObject = 27;
getAnIOObjectInfo = 28;
getAnIOObjectReference = 29;
checkIOObjectRegisterIsFull = 30;
getIOObjectCount = 31;
getIndexedIOObjectReference = 32;
eventsVersion = 5;
eventRePositioned = 1;
eventGoAwayMouse = 2;
eventUpdate = 3;
eventActivate = 4;
eventDeactivate = 5;
eventMenuClick = 6;
eventMenuSelect = 7;
eventMenuKey = 8;
eventKey = 9;
eventSelect = 10;
eventClose = 11;
eventSave = 12;
eventSaveAs = 13;
eventQuit = 14;
eventShutdown = 15;
eventRestart = 16;
eventRevert = 17;
eventCalculateMenus = 18;
eventDisplayChar = 19;
eventDisplayText = 20;
eventDisplayFlush = 21;
eventDisplaySelection = 22;
eventContentClick = 23;
eventReadTerm = 24;
eventInitialise = 25;
eventSee = 26;
eventTell = 27;
eventSeeing = 28;
eventTelling = 29;
eventSeen = 30;
eventTold = 31;
eventGetCursorInfo = 32;
eventIdle = 33;
eventSuspend = 34;
eventResume = 35;
eventCloseAll = 36;
eventStartup = 37;
eventKissByeBye = 38;
eventGetEntry = 39;
eventItemHit = 40;
eventFindString = 41;
eventReplaceString = 42;
eventGetGrowLimit = 43;
eventSetWindowSize = 44;
eventWindowCommand = 45;
eventGetFPos = 46;
eventDoNothing = 47;
eventFileCommand = 48;
eventDoZoom = 49;
eventTakeRawEvent = 50;
debugStepped = 51;
debugStep = 52;
wcGetNumber = 1;
wcGetWindow = 2;
wcGetSelection = 3;
wcSetSelection = 4;
wcSetOutline = 5;
wcClearOutline = 6;
wcClearAllOutlines = 7;
wcSetAsOutput = 8;
wcGetIndex = 9;
wcGetStartingPoint = 10;
wcSetStartingPoint = 11;
wcPurgeInput = 12;
wcOpenFileWindow = 13;
wcOpenNewWindow = 14;
wcGetFontInfo = 15;
wcSetInput = 16;
wcBufferSize = 17;
wcGetWindowKind = 18;
messageOK = 0;
messageQuit = 1;
messageReset = 2;
messageExecute = 3;
messageFail = 4;
messageKey = 5;
messageClick = 6;
messageShutdown = 7;
messageRestart = 8;
messageInterrupt = 9;
messageEntry = 10;
messageCancel = 11;
messageNoReply = 12;
messageError = - 32768;
rtOK = 0;
rtError = - 32768;
rtIncomplete = - 32767;
rtNumberRangeError = - 32766;
rtQuotedAtomTooLong = - 32765;
rtStringTooLong = - 32764;
rtAtomTooLong = - 32763;
rtVariableNameTooLong = - 32762;
rtUnexpectedEOF = - 32761;
rtUnexpectedCharacter = - 32760;
rtUnificationFailure = - 32759;
rtOperatorError = - 32758;
rtCantFindFile = - 32757;
rtFileIsAFolder = - 32756;
rtFileIsWrongTypeForReading = - 32755;
rtFileIsAlreadyOpen = - 32754;
rtDiskIsFull = - 32753;
rtDiskIsLocked = - 32752;
rtFileIsLocked = - 32751;
rtFileIsReadOnly = - 32750;
rtFileIOProblem = - 32749;
rtCantGetEnoughMemory = - 32748;
rtAttemptToReadPastEof = - 32747;
rtSpaceError = - 32746;
rtBufferTooSmall = - 32745;
rtNonSequentialFileAccess = - 32744;
rtCantOpenForReading = - 32743;
rtCantOpenForWriting = - 32742;
rtFileTableFull = - 32741;
rtFileIsWrongTypeForWriting = - 32740;
rtDirectoryNotFound = - 32739;
rtFileAlreadyExists = - 32738;
rtNoSuchVolume = - 32737;
rtOutputStringTooBig = - 32736;
rtNoToken = - 32735;
appleMenu = 128;
fileMenu = 129;
editMenu = 130;
findMenu = 131;
windowMenu = 132;
controlMenu = 133;
submenuNumber = 170;
publishingMenu = submenuNumber + 0;
openMenu = submenuNumber + 1;
consultMenu = submenuNumber + 2;
reconsultMenu = submenuNumber + 3;
formatMenu = submenuNumber + 4;
fontMenu = submenuNumber + 5;
sizeMenu = submenuNumber + 6;
newItem = 1;
openItem = 2;
openSelectedFileItem = 3;
closeItem = 5;
saveItem = 6;
saveAsItem = 7;
revertItem = 8;
pageSetupItem = 9;
printItem = 10;
printSelectionItem = 11;
quitItem = 13;
undoItem = 1;
cutItem = 3;
copyItem = 4;
pasteItem = 5;
clearItem = 6;
selectAllItem = 8;
publishingMenuItem = 10;
autoIndentItem = 1;
fontItem = 3;
fontSizeItem = 4;
replaceDialogId = 132;
findDialogId = 133;
findItem = 1;
findSameItem = 2;
findSelectionItem = 3;
displaySelectionItem = 4;
replaceItem = 6;
replaceSelectionItem = 7;
selectInputWindowItem = 9;
createPublisherItem = 1;
subscribeToItem = 2;
publisherOptionsItem = 3;
openFileItem = 1;
openSelectedFileSubItem = 2;
consultFileItem = 1;
consultSelectedFileItem = 2;
consultWindowItem = 3;
consultSelectionItem = 4;
TYPE
{io stream linkage}
ioOPCommandType = (ioOPGetByte, ioOPGetChar, ioOPPutByte, ioOPPutChar,
ioOPPutText, ioOPFlush,ioOPClose,ioOPOpen,
ioOPSetPosition,ioOPSetSize,
ioOPGetPosition,ioOPGetSize,
ioOPGetProperties,ioOPSetProperties
);
ioOPPtr = ^ioOPParameterList;
ioOPParameterList = RECORD
ioOPResult: osErr;
ioOPData: longint;
ioOPCommand: ioOPCommandType;
p1, p2: longint;
END;
prlxRecord = RECORD
request, id: integer;
data: ARRAY [1..4] OF longint;
callbackRequest: integer;
callbackData: ARRAY [1..4] OF longint;
s: str255;
entryPoint: procPtr;
successful: boolean;
determinate: boolean;
outcome: integer;
permanentData: longint;
callbackAvailable: boolean;
prlxHandleFlags: signedByte;
prlxHandle: ^ProcPtr;
prlxFunctor: longint; {private - reserved}
END;
prlxPtr = ^prlxRecord;
termIndex = 0..8192;
atomReference = longint;
PROCEDURE callback(address: procPtr);
INLINE $205F, $4E90;
IMPLEMENTATION
END.